package com.aizhixin.lab.task.repository;

import com.aizhixin.lab.task.entity.TaskStuInfor;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;


public interface TaskStuInforRepository extends JpaRepository<TaskStuInfor, String> {
	List<TaskStuInfor> findAllByReleaseTaskIdAndDeleteFlagOrderByStuIdAsc(String releaseTaskId,Integer deleteFlag);
	List<TaskStuInfor> findAllByReleaseTaskIdAndTaskStatusAndDeleteFlagOrderByStuIdAsc(String releaseTaskId,String taskStatus,Integer deleteFlag);
	Integer countByReleaseTaskIdAndTaskStatusAndDeleteFlag(String releaseTaskId,String taskStatus,Integer deleteFlag);
	Integer countByReleaseTaskIdAndDeleteFlag(String releaseTaskId,Integer deleteFlag);
	Integer countByReleaseTaskIdAndDeleteFlagAndCommitTimeIsNull(String releaseTaskId,Integer deleteFlag);
	TaskStuInfor findById(String id);
	Integer countByStuIdAndTaskStatusAndDeleteFlag(Long stuId,String taskStatus,Integer deleteFlag);
	Integer countByStuIdAndDeleteFlag(Long stuId,Integer deleteFlag);
	List<TaskStuInfor> findAllByReleaseTaskIdAndDeleteFlag(String releaseTaskId,Integer deleteFlag);
	List<TaskStuInfor> findByCourseClassIdAndStuIdAndDeleteFlagAndTaskStatus(String courseClassId,Long stuId,Integer deleteFlag,String taskStatus);


}
